home *** CD-ROM | disk | FTP | other *** search
/ WWW Studio 2004 / WWW Studio.iso / Programy / Demo / angielskidemo_setup.exe / #setuppath# / 5.dxr / 00024_koloranka klik.ls < prev    next >
Encoding:
Text File  |  2004-02-01  |  760 b   |  32 lines

  1. property usecursor
  2. global timebuffer2, kolor_activecolor, gv_kolorowanka_undo, gv_colortable
  3.  
  4. on mouseDown me
  5.   timebuffer2 = the timer
  6.   p = the clickLoc
  7.   x = getAt(p, 1) - sprite(me.spriteNum).locH
  8.   y = getAt(p, 2) - sprite(me.spriteNum).locV
  9.   FX("5_1501P.WAV")
  10.   put x, y
  11.   a = getpoint(sprite(me.spriteNum), x, y, 0)
  12.   if getAt(gv_colortable, kolor_activecolor) <> a then
  13.     add(gv_kolorowanka_undo, [x, y, a])
  14.     if count(gv_kolorowanka_undo) > 20 then
  15.       deleteAt(gv_kolorowanka_undo, 1)
  16.     end if
  17.     paint(sprite(me.spriteNum), x, y, 0)
  18.     forceredraw(sprite(me.spriteNum))
  19.     updateStage()
  20.   end if
  21. end
  22.  
  23. on mouseEnter
  24.   timebuffer2 = the timer
  25.   cursor(usecursor)
  26. end
  27.  
  28. on mouseLeave
  29.   timebuffer2 = the timer
  30.   setcursor(#CursorNormal)
  31. end
  32.